package com.huoyun.car.bean;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class CarPubInfoCar {
	private Long id;

	private String startProvince;

	private String startCity;

	private String startDistrict;

	private String destinationProvince;

	private String destinationCity;

	private String destinationDistrict;

	private Date starttime;

	private Date endtime;

	private Float loadMax;

	private String unit;

	private String urgentContact;
	
	private String defaultContact;

	private int retour;

	private Float loadExisting;

	private String cargoExistingInfo;
	
	private int userId;
	
	private int carId;
	
	private String carNumber;
	
	private String imgPath;
	
	private int goodsIsInvite;//货主是否已经邀请车辆，如果已经邀请为1，如果没有邀请为0

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getStartProvince() {
		return startProvince;
	}

	public void setStartProvince(String startProvince) {
		this.startProvince = startProvince;
	}

	public String getStartCity() {
		return startCity;
	}

	public void setStartCity(String startCity) {
		this.startCity = startCity;
	}

	public String getStartDistrict() {
		return startDistrict;
	}

	public void setStartDistrict(String startDistrict) {
		this.startDistrict = startDistrict;
	}

	public String getDestinationProvince() {
		return destinationProvince;
	}

	public void setDestinationProvince(String destinationProvince) {
		this.destinationProvince = destinationProvince;
	}

	public String getDestinationCity() {
		return destinationCity;
	}

	public void setDestinationCity(String destinationCity) {
		this.destinationCity = destinationCity;
	}

	public String getDestinationDistrict() {
		return destinationDistrict;
	}

	public void setDestinationDistrict(String destinationDistrict) {
		this.destinationDistrict = destinationDistrict;
	}

	public Date getStarttime() {
		return starttime;
	}

	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}

	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}

	public Float getLoadMax() {
		return loadMax;
	}

	public void setLoadMax(Float loadMax) {
		this.loadMax = loadMax;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getUrgentContact() {
		return urgentContact;
	}

	public void setUrgentContact(String urgentContact) {
		this.urgentContact = urgentContact;
	}

	public String getDefaultContact() {
		return defaultContact;
	}

	public void setDefaultContact(String defaultContact) {
		this.defaultContact = defaultContact;
	}

	public int getRetour() {
		return retour;
	}

	public void setRetour(int retour) {
		this.retour = retour;
	}

	public Float getLoadExisting() {
		return loadExisting;
	}

	public void setLoadExisting(Float loadExisting) {
		this.loadExisting = loadExisting;
	}

	public String getCargoExistingInfo() {
		return cargoExistingInfo;
	}

	public void setCargoExistingInfo(String cargoExistingInfo) {
		this.cargoExistingInfo = cargoExistingInfo;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getCarId() {
		return carId;
	}

	public void setCarId(int carId) {
		this.carId = carId;
	}

	public String getCarNumber() {
		return carNumber;
	}

	public void setCarNumber(String carNumber) {
		this.carNumber = carNumber;
	}

	public String getImgPath() {
		return imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}
	
	public String getStarttimeStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm").format(starttime);
	}
	
	public void setStarttimeStr(String starttimeStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm");
		try {
			this.starttime = format.parse(starttimeStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}


	public String getEndtimeStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm").format(endtime);
	}
	
	public void setEndtimeStr(String endtimeStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm");
		try {
			this.endtime = format.parse(endtimeStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public int getGoodsIsInvite() {
		return goodsIsInvite;
	}

	public void setGoodsIsInvite(int goodsIsInvite) {
		this.goodsIsInvite = goodsIsInvite;
	}
	
}
